<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="/tag/sys" prefix="sys"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<sys:baseUrl/>">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="Stylesheet" href="style/common.css" />
<link rel="stylesheet" href="style/floatDiv.css" type="text/css" />
<script type="text/javascript" src="js/floatDiv.js"></script>
<title>查看所有用户</title>
<style>
#delete_confirm{
	display: none;
	border:1px solid;
	width:320px;
	height:105px;
	font-size: medium;
}

#delete_title{
	border-bottom: 1px solid;
	background: #DDD;
}

#refresh{
	text-align:left;
	width:85%;
	margin:auto;
}
</style>
<script type="text/javascript">
function delete_confirm(username){
	var str="确认删除用户 "+username+" 么？";
	var tip=document.getElementById("delete_tip");
	var url=document.getElementById("delete_url");
	url.href="<sys:baseUrl/>user/delete?uid="+username;
	tip.innerHTML=str;
	showDiv('delete_confirm','event',320,250);
}

</script>
</head>
<body>
<div id="refresh"><a href="javascript:window.location.reload();">刷新</a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<font color="red">${message }</font>
</div><br/>
<table style="margin:auto;" width="88%">
<tr>
<th>用户名</th><th>登录名</th>
<th>用户身份</th><th>操作</th>
</tr>
<c:forEach items="${list }" var="u" varStatus="status">
<tr <c:if test="${status.index%2==1}">class="even"</c:if>>
<td>${u.name }</td><td>${u.username }</td><td>${u.power }</td>
<td><a href="javascript:delete_confirm('${u.username }')">[删除]</a> 
<a href='javascript:top.newTab("修改用户信息","user/alertUser?username=${u.username }")'>[修改]</a></td>
</c:forEach>
</table>
<div id="delete_confirm" class="floatDiv">
		<div id="delete_title">确认删除用户</div>
		<h3 id="delete_tip"></h3>
		<a id="delete_url" href="#">[删除]</a>
		<a href="javascript:closeDiv('delete_confirm')">[取消]</a>
	</div>
</body>
</html>